package com.roomio.core.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.roomio.core.dao.CodelistDAO;
import com.roomio.core.service.CodelistService;
import com.roomio.core.types.Codelist;

@Service("codelistService")
@Transactional
public class CodelistServiceImpl extends BaseService implements CodelistService {
	protected final Logger log = LoggerFactory.getLogger(getClass());

	@Resource(name = "codelistDAO")
	private CodelistDAO codelistDAO;
	
	@Override
	public <T extends Codelist> List<T> findValuesByType(String codeType) {
		return codelistDAO.findValuesByType(codeType);
	}

	@Override
	public <T extends Codelist> List<T> findValuesByTypeAndCriteria(String codeType, String hqlCriteria) {
		return findValuesByTypeAndCriteria(codeType, hqlCriteria);
	}

}
